package com.atguigu1.one;

/**
 * ClassName: oneArrayTest1
 * Package: com.atguigu1.one
 * Description:
 *
 * @Author BuTang
 * @Create 2023/2/22 19:06
 * @Version 1.0
 */
public class oneArrayTest1 {
    public static void main(String args[]) {
        //5.数组元素的默认初始化值

        //整形数组元素的默认初始化值0
        int[] arr = new int[5];
        for (int i = 0; i < 5; i++) {
            System.out.println(arr[i]);
        }

        //浮点型数组元素的默认初始化值 0.0
        double[] arr1 = new double[1];
        System.out.println(arr1[0]);

        //字符型数组元素的默认初始化值 0
        char[] s1 = new char[2];
        System.out.println(s1[0]);
        //boolean型数组元素默认初始化值false
        boolean[] b1 = new boolean[1];
        System.out.println(b1[0]);

        //引用数据类型元素默认初始化值
        String[] s2 =new String[5];
        for (int i = 0; i < 5; i++) {
            System.out.println(s2[i]);
        }


    }
}
